package com.ruoyi.service.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.service.mapper.EconomizeMapper;
import com.ruoyi.service.domain.Economize;
import com.ruoyi.service.service.IEconomizeService;
import com.ruoyi.common.support.Convert;

/**
 * 节能替代方案 服务层实现
 * 
 * @author john
 * @date 2019-01-04
 */
@Service
public class EconomizeServiceImpl implements IEconomizeService 
{
	@Autowired
	private EconomizeMapper economizeMapper;

	/**
     * 查询节能替代方案信息
     * 
     * @param id 节能替代方案ID
     * @return 节能替代方案信息
     */
    @Override
	public Economize selectEconomizeById(Integer id)
	{
	    return economizeMapper.selectEconomizeById(id);
	}
	
	/**
     * 查询节能替代方案列表
     * 
     * @param economize 节能替代方案信息
     * @return 节能替代方案集合
     */
	@Override
	public List<Economize> selectEconomizeList(Economize economize)
	{
	    return economizeMapper.selectEconomizeList(economize);
	}
	
    /**
     * 新增节能替代方案
     * 
     * @param economize 节能替代方案信息
     * @return 结果
     */
	@Override
	public int insertEconomize(Economize economize)
	{
	    return economizeMapper.insertEconomize(economize);
	}
	
	/**
     * 修改节能替代方案
     * 
     * @param economize 节能替代方案信息
     * @return 结果
     */
	@Override
	public int updateEconomize(Economize economize)
	{
	    return economizeMapper.updateEconomize(economize);
	}

	/**
     * 删除节能替代方案对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteEconomizeByIds(String ids)
	{
		return economizeMapper.deleteEconomizeByIds(Convert.toStrArray(ids));
	}
	
}
